#include <stdio.h>
#include <iostream.h>
#include <string.h>
#include <stdlib.h>

	char	endgame[27]="BULLSHIT";
	char 	wordlist[27][500][27];
	long	wordn[27];
	long	n;
	long	totword=0;
	long	currgame=0;
	long	totgame=0;
	char    temp[105];
	char	p[27];

long ins(const char * p)
{
	long	i,j,k;
	k=p[0]-'A';
	for (i=1;i<=wordn[k];i++)
		if (strcmp(p,wordlist[k][i])==0) return 1;
	wordn[k]++;
	strcpy(wordlist[k][wordn[k]],p);
	return 0;
}
	
long splitword(long & ind,const long len)
{
	long	i,j,k;
	
	while (ind<len && !(toupper(temp[ind])<='Z' && toupper(temp[ind])>='A')) ind++;
	if (ind>=len) return 0;
	k=0;
	while (ind<len && (toupper(temp[ind])<='Z' && toupper(temp[ind])>='A')) 
	{
		p[k++]=toupper(temp[ind++]);
	}
	p[k]=0;
	if (strcmp(p,endgame)==0) 
	{
		memset(wordn,0,sizeof(wordn));
		totword+=currgame;
		currgame=0;
		totgame++;
	}
	else 
	{
		k=ins(p);
		if (k==0) currgame++;
	}

	return 0;
}

long gcd(long a,long b)
{
	long	k;
	if (b>a) {k=b; b=a; a=k;}
	k=a%b;
	while (k!=0)
	{
		a=b;
		b=k;
		k=a%b;
	}
	return b;
}

main()
{
	long	i,j,k,ind,len,d;

	//freopen("b.in","r",stdin);

	memset(wordn,0,sizeof(wordn));
	while (scanf("%s",temp)!=EOF)
	{
		ind=0;
		len=strlen(temp);
		do {
			splitword(ind,len); // long & ind
		} while (ind<len);
	}
	d=gcd(totword,totgame);
	totword/=d;
	totgame/=d;
	printf("%ld / %ld\n",totword,totgame);

	return 0;
}


